<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<html>
<head>
<title>渠道统计</title>
</head>
<body>
<script type="text/javascript">
	function exportExcel(){
		var time = $("#selectDate").val();
		$("#datetime").val(time);
		$("#exportform").submit();
	}
	
	
</script>
<jsp:include page="_headChannel.jsp"></jsp:include>
<form class="form-inline" id="exportform" action="exportCreateRole.do" method="post">
	<input type="hidden" id="datetime" name="exportTime" value="" />
</form>

<form class="form-inline" action="" method="get" id="mallForm">
 <input type ="hidden" name ="state" id="state" value ="" />
日期:
<div class="datepicker input-append">
    <input data-format="yyyy-MM-dd" type="text" value="${selectDate}" name="selectDate" id="selectDate"></input>
    <span class="add-on">
      <i data-time-icon="icon-time" data-date-icon="icon-calendar">
      </i>
    </span>
  </div>

  <button type="submit" class="btn">查询</button>
  
  <button type="button" class="btn" onClick="exportExcel()">导出月数据报表</button>
</form>
<table class="table table-bordered">
	<thead>
	   <tr>
		<th>日期</th>
		<th>渠道名称</th> 
		<th>点击次数</th> 
		<th></th> 
	   </tr>
	</thead>
	<tbody id="channel_body_id">
		<c:forEach var="data" items="${datalist}">
			<tr>
				<td >${selectDate}</td>
				<td >${channelMap.get(data.channel) }(id:${data.channel})</td>
				<td >${data.visitCount}</td>
				<td ></td>
			</tr>
		</c:forEach>
	</tbody>
</table>

</body>
</html>
 